package com.hsgene.order.constants.v1;

/**
 * 性别枚举
 *
 * @author wangbing
 * @version 1.0, 2018/9/20
 */
public enum GenderType {
    /**
     * 性别枚举
     */
    FEMALE(0, "女"), MALE(1, "男");

    private final int code;

    private final String desc;

    GenderType(int code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public static GenderType getEnum(int code) {
        return code == 0 ? FEMALE : MALE;
    }

    public int getCode() {
        return code;
    }

    public String getDesc() {
        return desc;
    }
}
